<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            transform: scale();
        }
    </style>
    <script>

        var pwd, pwdAgain;
        pwd = Number(prompt("请输入密码："));
        while (pwd != 123456) {
            pwd = Number(prompt("密码错误，请重新输入密码："));
            if (pwd == 123456) {
                pwdAgain = Number(prompt("请再次输入密码："));
                while (pwd != pwdAgain) {
                    pwdAgain = Number(prompt("第二次密码错误，请重新输入："));
                    if (pwd == pwdAgain) {
                        alert("密码正确");
                        break;
                    }
                }
            }
        }
    </script>
</head>

<body>
    <div style="width: 100px;height: 100px; margin: 0 auto; background-color: pink;"></div>
</body>

</html>